package com.hackordie.commons.game.player;

import com.hackordie.commons.hardware.components.AComponent;
import com.hackordie.constants.EComponentsType;

public class UserComponent {

    private int idComponentOnBag;   //id unico de un componente de la tabla "userComponents"
    private AComponent component;   //datos genericos del componente
    private boolean mounted;        //indica si el componente esta montado en el pc o no
    private int idUser;             //id del usuario al que pertenece el componente
    private EComponentsType componentType;      //tipo de componente
    private int life;               //indica la vida del componente //TODO para la 2.0
    
    
    public UserComponent(int idComponentOnBag, boolean mounted, EComponentsType componentType, int life) {
        super();
        this.idComponentOnBag = idComponentOnBag;
        this.component = null;
        this.mounted = mounted;
        this.componentType = componentType;
        this.life = life;
        this.idUser = 0;
    }
            
    public UserComponent(int idComponentOnBag, AComponent component,
            boolean mounted, EComponentsType componentType, int life) {
        super();
        this.idComponentOnBag = idComponentOnBag;
        this.component = component;
        this.mounted = mounted;
        this.componentType = componentType;
        this.life = life;
        this.idUser = 0;
    }
    
    
    
    public UserComponent(int idComponentOnBag, AComponent component,
            boolean mounted, int idUser, EComponentsType componentType, int life) {
        super();
        this.idComponentOnBag = idComponentOnBag;
        this.component = component;
        this.mounted = mounted;
        this.idUser = idUser;
        this.componentType = componentType;
        this.life = life;
    }

    public UserComponent() {
        super();
    }

    public int getIdComponentOnBag() {
        return idComponentOnBag;
    }
    
    public void setIdComponentOnBag(int idComponentOnBag) {
        this.idComponentOnBag = idComponentOnBag;
    }

    public AComponent getComponent() {
        return component;
    }

    public void setComponent(AComponent component) {
        this.component = component;
    }

    public boolean isMounted() {
        return mounted;
    }

    public void setMounted(boolean mounted) {
        this.mounted = mounted;
    }

    public EComponentsType getComponentType() {
        return componentType;
    }

    public void setComponentType(EComponentsType componentType) {
        this.componentType = componentType;
    }

    public int getLife() {
        return life;
    }

    public void setLife(int life) {
        this.life = life;
    }

    public int getIdUser() {
        return idUser;
    }

    public void setIdUser(int idUser) {
        this.idUser = idUser;
    }    
}
